<template>
<div class="search_entry_container" >
    <span style="margin-bottom:3%;">热搜词条</span>
    <div @click="goto_article(0)" class="first">
        <div class="title_container">
            <div class="title">{{hotEntry[0].title}}</div>
            <i class="el-icon-top"></i>
        </div>
        <div class="content">
            {{hotEntry[0].introduce}}
        </div>
    </div>
    <div  @click="goto_article(1)" class="second">
        <div class="title_container">
            <div class="title">{{hotEntry[1].title}}</div>
            <i class="el-icon-top"></i>
        </div>
        <div class="content">
             {{hotEntry[1].introduce}}
        </div>
    </div>
    <div  @click="goto_article(2)" class="third_container">
        <div class="third_first">
            <div class="title_container">
                <div class="title">{{hotEntry[2].title}}</div>
                <i class="el-icon-top"></i>
            </div>
            <div class="content">
               {{hotEntry[2].introduce}}
            </div>
        </div>
    </div>
</div>
</template>
<script>
export default {
    props:{
        hotEntry:{
            type: Array,
            default: () => []
        }
    },
    data () {
        return {
            
        }
    },
    created() {
      
    },
    methods:{
        goto_article(i){
            let link;
           switch(i) {
               case 0:
                    link = this.hotEntry[0].aid;
                    break;
                case 1:
                    link = this.hotEntry[1].aid;
                    break;
                case 2:
                    link = this.hotEntry[2].aid;
                    break;
                
           }
           this.$router.push(`/pc/scienceAticle?article_id=${link}`)
        },
    }
}
</script>
<style scoped>
    .search_entry_container {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        margin-left: 15px;
    }
    .search_entry_container>div {
        height: 21%;   
    }
    .first,.second {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
    }
    .first {
        width: 100%;
        background: #cde6fe;
    }
    .second {
        width: 100%;
        background: #e6f3ff;
    }
    .third_container {
        width: 100%;
        display: flex;
        overflow: hidden;
    }
    .third_first,.third_second {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
    }
    .third_first {
        width: 100%;
        background: #f5f6f7;
    }
    .third_second {
        width: 50%;
        background: #fcfcfc;
    }
    .title_container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-left: 5px;
        margin-right: 5px;
    }
    .title {
        font-size: 20px;
        color: #333;
        cursor: pointer;
    }
    .el-icon-top {
        font-size: 16px;
        color: #338de6;
    }
    .content {
        color: #666;
        margin-left: 5px;
        overflow: hidden;
    }
    .first:hover {
        border: 0.5px solid #338de6;
        cursor: pointer;
    }
    .first:hover .title {
        color: #338de6;
    }
    .second:hover {
        cursor: pointer;
        border: 0.5px solid #338de6;
    }
    .second:hover .title {
        color: #338de6;
    }
    .third_first:hover {
        cursor: pointer;
        border: 0.5px solid #338de6;
    }
    .third_second:hover {
        cursor: pointer;
        border: 0.5px solid #338de6;
    }
    .third_first:hover .title{
         color: #338de6;
    }
    .third_second:hover .title{
         color: #338de6;
    }
    
     @media screen and (max-width: 1586px){
        .title {
            font-size: 16px;
            color: #333;
            cursor: pointer;
        }
        .content {
            font-size: 12px;
        }
     }
    
</style>